package com.freeman.cement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.freeman.cement.entity.EventType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface EventTypeDao extends BaseMapper<EventType> {
    List<EventType> selectAllEventType();
    List<EventType> selectSubEventType(int dutyroomId);
    List<EventType> selectEventTypeByNameOrType(EventType eventType);
    EventType findEventType(@Param("eventType")String eventType);
    List<EventType> selectEventTypeById(EventType eventType);
    int addEventType(EventType eventType);
    int deleteEventType(EventType eventType);
    int updateEventType(EventType eventType);
    void subscribeEventType(@Param("dutyRoomId")int dutyRoomId, @Param("eventType")String eventType);
    void deleteSubEventType(@Param("dutyRoomId")int dutyRoomId, @Param("eventType")String eventType);
}
